import { state } from "../config.js";

//幕布
const mask = document.querySelector(".mask") as HTMLDivElement;
//#region 幕布设置
export function closeMask() {
  mask.style.display = "none";
  mask.innerHTML = "";
  state.stop = false;
}
export function openMask() {
  mask.style.display = "flex";
  state.stop = true;
}
export function setMaskContent(str: string) {
  mask.innerHTML = str;
}

mask.onclick = ({ target }) => target === mask && closeMask();
//#endregion
